/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.expert.entity;

import com.chlitina.store.common.persistence.BaseEntity;
import com.chlitina.store.modules.base.entity.StoreCare;

/**
 * 客户采纳护理项目复合主键
 * @author lvbo
 * @version 2013-06-20
 */
public class CustomerSolutionCarePK extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	private CustomerSolution customerSolution; //客户采纳方案
	private StoreCare storeCare; //客户采纳护理项目

	public CustomerSolutionCarePK() {
	}

	public CustomerSolution getCustomerSolution() {
		return customerSolution;
	}

	public void setCustomerSolution(CustomerSolution customerSolution) {
		this.customerSolution = customerSolution;
	}

	public StoreCare getStoreCare() {
		return storeCare;
	}

	public void setStoreCare(StoreCare storeCare) {
		this.storeCare = storeCare;
	}
	
	@Override
	public int hashCode() {
		return this.customerSolution.hashCode() + this.storeCare.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final CustomerSolutionCarePK other = (CustomerSolutionCarePK) obj;
		if (customerSolution.getId() == other.getCustomerSolution().getId() &&
				storeCare.getId() == other.getStoreCare().getId()) {
			return true;
		} 
		return false;
	}
}